<script type="text/javascript">

$(document).ready(function() {
    <?foreach ($this->components as $component):  ?>
        $.post('/component-plugin/get-component',{id : '<?=$component['component_id']?>',label: '<?=$component['label']?>',params:$.toJSON(<?=$component['params']?>)},
            function(result){
                $('#mainScreen').append('<div <?if ($component['theme_name'] != 'N/A'):?>class="<?=$component['theme_name']?>" <?endif?>style="width: <?=$component['width']?>;height: <?=$component['height']?>;position:absolute;top:<?=$component['top']?>;left:<?=$component['left']?>;min-height:<?=$component['min_height']?>;min-width:<?=$component['min_width']?>">' + result + '</div>');
        });
            
  
    <?endforeach;?>
});

</script>
<div id="mainScreen" style="position:relative;">

</div>
